/**
 * Copyright 1993-2018 Agree Tech.
 * All rights reserved.
 */
package com.fjl.pojo;

import com.fjl.exception.AbpmServiceException;
import com.fjl.result.AbpmServiceResults;

import java.util.List;

/**
 * 服务结果
 */
public class ServiceResultInAbxMultiBranch
{

    private String businessKey;

    private String definitionCaption;

    private String definitionKey;

    private boolean ended;

    private String resultCode;

    private String resultDetail;

    private String resultMessage;

    private String rootProcessInstanceId;

    private List<AsyncTaskDetail> taskDetailList;

    private boolean exceptionallyEnded;

    private  String processVersion;

    /**
     * @param exception
     */
    public void exception(AbpmServiceException exception)
    {
        this.resultCode = exception.getCode();
        this.resultMessage = exception.getMessage();
        this.resultDetail = exception.getDetail();
    }

    public void exception(AbpmServiceResults callResult)
    {
        this.resultCode = callResult.getCode();
        this.resultMessage = callResult.getMessage();
    }

    public void exception(AbpmServiceResults callResult, String detail)
    {
        this.resultCode = callResult.getCode();
        this.resultMessage = callResult.getMessage();
        this.resultDetail = detail;
    }

    /**
     * @return the businessKey
     */
    public String getBusinessKey()
    {
        return businessKey;
    }

    /**
     * @return the definitionCaption
     */
    public String getDefinitionCaption()
    {
        return definitionCaption;
    }

    /**
     * @return the definitionKey
     */
    public String getDefinitionKey()
    {
        return definitionKey;
    }

    /**
     * @return the resultCode
     */
    public String getResultCode()
    {
        return resultCode;
    }

    /**
     * @return the resultDetail
     */
    public String getResultDetail()
    {
        return resultDetail;
    }

    /**
     * @return the resultMessage
     */
    public String getResultMessage()
    {
        return resultMessage;
    }

    /**
     * @return the rootProcessInstanceId
     */
    public String getRootProcessInstanceId()
    {
        return rootProcessInstanceId;
    }

    public List<AsyncTaskDetail> getTaskDetailList()
    {
        return taskDetailList;
    }

    public boolean isEnded()
    {
        return ended;
    }

    /**
     * @param businessKey
     *            the businessKey to set
     */
    public void setBusinessKey(String businessKey)
    {
        this.businessKey = businessKey;
    }

    /**
     * @param definitionCaption
     *            the definitionCaption to set
     */
    public void setDefinitionCaption(String definitionCaption)
    {
        this.definitionCaption = definitionCaption;
    }

    /**
     * @param definitionKey
     *            the definitionKey to set
     */
    public void setDefinitionKey(String definitionKey)
    {
        this.definitionKey = definitionKey;
    }

    public void setEnded(boolean ended)
    {
        this.ended = ended;
    }

    /**
     * @param resultCode
     *            the resultCode to set
     */
    public void setResultCode(String resultCode)
    {
        this.resultCode = resultCode;
    }

    /**
     * @param resultDetail the resultDetail to set
     */
    public void setResultDetail(String resultDetail)
    {
        this.resultDetail = resultDetail;
    }

    /**
     * @param resultMessage
     *            the resultMessage to set
     */
    public void setResultMessage(String resultMessage)
    {
        this.resultMessage = resultMessage;
    }

    /**
     * @param rootProcessInstanceId
     *            the rootProcessInstanceId to set
     */
    public void setRootProcessInstanceId(String rootProcessInstanceId)
    {
        this.rootProcessInstanceId = rootProcessInstanceId;
    }

    public void setTaskDetailList(List<AsyncTaskDetail> taskDetailList)
    {
        this.taskDetailList = taskDetailList;
    }

    public boolean isExceptionallyEnded()
    {
        return exceptionallyEnded;
    }

    public void setExceptionallyEnded(boolean exceptionallyEnded)
    {
        this.exceptionallyEnded = exceptionallyEnded;
    }

    public String getProcessVersion() {
        return processVersion;
    }

    public void setProcessVersion(String processVersion) {
        this.processVersion = processVersion;
    }
}
